<?php
	class MY_Controller extends Controller {
		function MY_Controller(){
			parent::Controller();			
			$this->load->library('session');
			$username=$this->session->userdata('username');
			if(!$username){
				header('location:'.site_url('admin/login'));
				return;
			}	
	    }
		
	}
	
?>